﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AGuang.WebTool {
    /// <summary>
    /// 字符串转换工具
    /// </summary>
    [Obsolete("已被最新的类,StringFilter替代")]
    public class StringTools {
        public static String Text2Html(String text) {
            StringBuilder sb = new StringBuilder(text);
            sb.Replace("  ", "&nbsp;&nbsp;");
            sb.Replace("\t", "&#9;");
            sb.Replace("<", "&lt;");
            sb.Replace(">", "&gt;");
            sb.Replace("\r\n", "<br />");
            sb.Replace("\r", "<br />");
            sb.Replace("\n", "<br />");
            return sb.ToString();
        }
    }
}
